import request from "./request"
//首页数据的请求
export const getHomeList = () => request.get("/index/index")

// 获取搜索弹出框的数据
export const getSearchPopupData = () => request.get("/search/index")

//发送请求，获取实时搜索的文本提示的数据列表
export const getSearchTipListData = (params) => request.get("/search/helper", { params })
// 下面这个是post请求携带的参数
// export const getSearchTipListData = post => request.get("/search/helper",post)

//获取搜索商品列表的数据
export const getGoodsListData = (params) => request.get("/goods/list", { params })

// 清除历史记录
export const ClearHistory = () => request.post("/search/clearhistory")

// 登录请求
export const GoLogin = (params) => request.post("/auth/loginByWeb", params)

//商品详情
export const getGoodsDetailData = (params) => request.get("/goods/detail", { params })

//相关产品
export const getGoodsRelatedlData = (params) => request.get("/goods/related", { params })

// 获取购物车产品数量
export const getGoodsCount = () => request.get("/cart/goodscount")

// 加入购物车
export const addProductToCart = (params) => request.post("/cart/add", params)

//获取购物车数据
export const GetCartListData = () => request.get("/cart/index")

//点击切换商品选中状态
export const ChangeGoodChecked = (params) => request.post("/cart/checked", params)

// 商品步进器
export const Septter = (params) => request.post("/cart/update", params)

// 删除商品
export const DeleteGood = (params) => request.post("/cart/delete", params)


